<?php
/* 本类仅用于webman中config/log.php内配置替换
 * 自定义了日志格式，不输出后面的两个空括号 %context% %extra%
 */

namespace app\utils;

use Monolog\Formatter\LineFormatter;

class MonoLogFormatter extends LineFormatter{

    public function __construct(
        ?string $format = null,
        ?string $dateFormat = null,
        bool $allowInlineLineBreaks = false,
        bool $ignoreEmptyContextAndExtra = false,
        bool $includeStacktraces = false
    ){
        parent::__construct("[%datetime%] %level_name%: %message%\n", $dateFormat, $allowInlineLineBreaks, $ignoreEmptyContextAndExtra, $includeStacktraces);
    }

}